package com.example.communitypro.mapper;

import com.example.communitypro.pojo.ChatList;
import com.example.communitypro.pojo.UserInformation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface ChatListDao {
    List<ChatList> getChatListBySender(Integer sender);

    int insertChatList(ChatList chatList);

    int updateChatList(ChatList chatList);

    int deleteChatList(int listId);

    ChatList getChatList(@Param("sender") Integer sender, @Param("receiver")Integer receiver);

    List<UserInformation> getUserBySender(Integer sender);

    int setUnRead(int listId);

    ChatList getChatListById(int listId);
}
